<!DOCTYPE html>
<html>
  <head>
    <title>申述</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="${s.base}/mobile/css/weui.min.css">
      <link rel="stylesheet" href="${s.base}/mobile/css/jquery-weui.css">
      <link rel="stylesheet" href="${s.base}/mobile/css/base.css">
      <link rel="stylesheet" href="${s.base}/mobile/css/component.css">
      <style type="text/css">
          html,body{background:#f5f5f5;}
          .xyg-comp-list-select{width:96%; margin: 0.2rem 2%; border-radius: 0.5rem; height:auto;}
          .xyg-comp-list-select-desc{width:100%;text-align:center;line-height:2.2rem; height:2.2rem;font-size: 0.8rem; color:#ffffff; letter-spacing: 0.01rem; border-radius: 0.2rem 0.2rem 0px 0px; background: #069AFE;border-right: 0.001rem solid #f5f5f5;border-left: 0.001rem solid #f5f5f5;}
          .xyg-comp-list-select-item{width:90%; padding:0px 5%; line-height:2.2rem; height:2.2rem;font-size: 0.8rem; color:#333333; letter-spacing: 0.01rem; background: #FFF; border: 0.001rem solid #f5f5f5;}
          .xyg-comp-list-select-item input::-webkit-input-placeholder {color: #999999;}
          .xyg-comp-list-select-item .xyg-comp-list-select-item-title{width:20%; color:#333333; height:2rem; text-align:left; float:left;}
          .xyg-comp-list-select-item .xyg-comp-list-select-item-content{width:80%; height:2rem; text-align:left; float:left;}
          .xyg-comp-list-select-item .xyg-comp-list-select-item-content input[type='text']{width:100%; height:2rem; line-height:2rem;background-color:transparent;border:0; text-align:left;}

          .xyg-comp-list-select-textarea{width:90%;  color:#333333;padding:0px 5%;height:8.2rem;font-size: 0.8rem;  letter-spacing: 0.01rem; background: #FFF; border: 0.001rem solid #f5f5f5;}
          .xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-title{width:100%; line-height: 2rem; height:2rem; text-align:left;}
          .xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-content{width:100%; height:4rem; text-align:left; float:left;}
          .xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-content textarea{width:92%; padding: 0.2rem 4%; height:4.6rem; margin-bottom: 1rem; line-height:1rem;background-color:#E5E5E5;;border:0; text-align:left;}

          .xyg-comp-xy{height:2rem; line-height:2rem;width:93%; margin:0px 2% 0px 5%;}
          .xyg-bottom{width:90%; height:auto;  margin:1.5rem 5%;}
          .xyg-bottom  .xyg-btn{
              position: relative;
              background: #069AFE;
              display: block;
              margin-left: auto;
              margin-right: auto;
              padding-left: 14px;
              padding-right: 14px;
              box-sizing: border-box;
              font-size: 18px;
              text-align: center;
              text-decoration: none;
              color: #fff;
              line-height: 2.55555556;
              border-radius: 5px;
              -webkit-tap-highlight-color: rgba(0,0,0,0);
              overflow: hidden;
          }
      </style>
  </head>
  <body>
	<div class="xyg-comp-list-select">
       <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title"> 
             名称
            </div>
             <div class="xyg-comp-list-select-item-content">
                 <input type="hidden" id="id" value="${shopOrderCoupon.id}"  />
             <input type="text" value="${shopOrderCoupon.itemName}" disabled />
            </div>
       </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
                卷码
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="${shopOrderCoupon.id}" disabled />
            </div>
        </div>
        <div class="xyg-comp-list-select-item">
            <div class="xyg-comp-list-select-item-title">
                价格
            </div>
            <div class="xyg-comp-list-select-item-content">
                <input type="text" value="￥${shopOrderCoupon.price}" disabled />
            </div>
        </div>
        <div class="xyg-comp-list-select-textarea">
            <div class="xyg-comp-list-select-textarea-title">
                纠纷原因
            </div>
            <div class="xyg-comp-list-select-textarea-content">
                <textarea disabled>${shopOrderCoupon.issueMessage}</textarea>
            </div>
        </div>
        <div class="xyg-comp-list-select-textarea">
            <div class="xyg-comp-list-select-textarea-title"> 
             申述原因
            </div>
             <div class="xyg-comp-list-select-textarea-content"> 
             <textarea id="issueCoverMessage">${shopOrderCoupon.issueCoverMessage}</textarea>
            </div>
       </div>

        <#if shopOrderCoupon.issueResultMessage !=null && shopOrderCoupon.issueResultMessage != "">
        <div class="xyg-comp-list-select-textarea">
            <div class="xyg-comp-list-select-textarea-title">
                处理结果
            </div>
            <div class="xyg-comp-list-select-textarea-content">
                <textarea id="issueResultMessage">${shopOrderCoupon.issueResultMessage}</textarea>
            </div>
        </div>
        </#if>
    </div>

   <div class="xyg-bottom">
       <#if shopOrderCoupon.issueStatus=="2" && shopOrderCoupon.status == "4">
    	    <a href="javascript:;" class="xyg-btn" id="submit" >立即申述</a>
        </#if>
    </div>
  </body>
  <script src="${s.base}/mobile/js/jquery-2.1.4.js"></script>
  <script src="${s.base}/mobile/js/jquery-weui.js"></script>
  <script src="${s.base}/mobile/fonts/iconfont.js"></script>
  <script>
      var memberId = '${memberId}';
      $("#submit").click(function () {
          var id = $("#id").val();
          var issueCoverMessage = $("#issueCoverMessage").val();
          if(issueCoverMessage == null || issueCoverMessage == ""){
              $.toast("请填写纠纷原因", "text");
              return false;
          }
          if(issueCoverMessage.length > 200){
              $.toast("纠纷原因不能超过100个字", "text");
              return false;
          }
          $.showLoading("正在提交中");
          $.ajax({
              type: "POST",
              url: "/phone/updateOrderCouponIssueStatusById?id="+id+"&issueCoverMessage="+issueCoverMessage,
              success: function(result){
                  if(0==result.code){
                      $.hideLoading();
                      // 刷新当前页面
                      window.location.href="/phone/detail?memberId="+memberId+"&status=4";
                  }else{
                      $.hideLoading();
                      $.toast(result.msg, "text");
                  }
              },
              error: function(result){
                  $.hideLoading();
                  $.toast(result, "text");
              }
          });
      });
  </script>
</html>

